﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WEATHER.Components;

namespace WEATHER.Modules.MANAGEMENT.Pages
{
    public partial class MeteorSpider : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string mid = Request.QueryString["mid"];
            Response.Write("<div style='font-family: Tahoma, Arial; font-size: 9pt'>");
            Response.Write("<strong>BẮT ĐẦU:</strong><br /><br />");
            Response.Flush();
            
            WEATHER.Components.Meteor.GetWeatherOnline(new Guid(mid), MeteorWeatherType.ThoiTietDatLien24H);
            Response.Write("Đang xử lý: Thời tiết đất liền 24H");
            Response.Flush();
            
            WEATHER.Components.Meteor.GetWeatherOnline(new Guid(mid), MeteorWeatherType.ThoiTietBien24H);
            Response.Write("<br />Đang xử lý: Thời tiết biển 24H");
            Response.Flush();
            
            WEATHER.Components.Meteor.GetWeatherOnline(new Guid(mid), MeteorWeatherType.DuBao10Ngay);
            Response.Write("<br />Đang xử lý: Dự báo 10 ngày");
            Response.Flush();

            WEATHER.Components.Meteor.GetWeatherOnline(new Guid(mid), MeteorWeatherType.DuBaoThang);
            Response.Write("<br />Đang xử lý: Dự báo tháng");
            Response.Flush();

            WEATHER.Components.Meteor.GetWeatherOnline(new Guid(mid), MeteorWeatherType.DuBaoMua);
            Response.Write("<br />Đang xử lý: Dự báo mùa");
            Response.Flush();

            Response.Write("<br /><br /><strong>HOÀN THÀNH:</strong> Lúc " + DateTime.Now + ")</div>");
            Response.Flush();
        }
    }
}
